/*****************************************************************************
 
 File:   OTKWorkspaceManager.java
 
 Date          Build     Author        Version    Comments
29-May-12    P-20-54    rkothari          $$1        Created

****************************************************************************/
package com.ptc.otkjavaexamples.ui;

import com.ptc.cipjava.jxthrowable;
import com.ptc.pfc.pfcGlobal.pfcGlobal;
import com.ptc.uifc.uifcTab.DefaultTabListener;
import com.ptc.uifc.uifcTab.Tab;
/*
 * Listener class for Server-Cache Tab  
 */

public class OTKServerCacheTab extends DefaultTabListener
{
    /*
     *  Override method OnItemSelect of DefaultTabListener
     */
    @Override
	public void OnItemSelect(Tab handle) throws jxthrowable
    {
	/*		 
	 * A standard message will be displayed when switching tabs from Server to Cache or vice versa 
	 */		
	if(handle.GetSelectedItemNameArray().get(0).matches("server_lay"))			
	    pfcGlobal.GetProESession().UIDisplayMessage("TabSwitch.txt","Server Tab",null);
	else if (handle.GetSelectedItemNameArray().get(0).matches("cache_lay"))
	    pfcGlobal.GetProESession().UIDisplayMessage("TabSwitch.txt","Cache Tab",null);
	
    }
    
}
